package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.SetmealDishService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api("套餐菜品关系相关接口")
@RequestMapping("/admin/")
public class SetmealDishController {

    @Autowired
    private SetmealDishService setmealDishService;

    /**
     * 功能描述: 删除菜品的时候要判断该菜品是否关联了套餐
     * @return : com.sky.result.Result
     */
    @ApiOperation("根据菜品id查询套餐id")
    @GetMapping("/{id}")
    public Result findSetmealIdsByDishIds(@PathVariable Long id){
        setmealDishService.findSetmealIdsByDishId(id);
        return Result.success();
    }
}
